package com.dzl.test;

import com.qfedu.hotelssm.dao.CtOrderdetailDao;
import com.qfedu.hotelssm.entity.CtOrderDetail;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author dzl
 * @date 2022/9/3 19:17
 */
public class Orderdetail {
    @Test
    public void t1(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring.xml");
        CtOrderdetailDao dao = context.getBean(CtOrderdetailDao.class);
        CtOrderDetail detail = new CtOrderDetail();
        detail.setUserid("1");
        detail.setKind("特色小菜");
        detail.setPrice(11.00);
        detail.setName("黄焖鸡");
        detail.setVegetableid(1);
        int save = dao.save(detail);
        System.out.println(save);
    }
}
